home *** CD-ROM | disk | FTP | other *** search
- .MODEL SMALL
-
- INCLUDE equates.inc
- INCLUDE instance.inc
- INCLUDE messages.inc
- INCLUDE objects.inc
-
- IF1
- INCLUDE macros.mac
- INCLUDE objects.mac
- INCLUDE cursor.mac
- ENDIF
-
- EXTRN menuInstVars:NEAR
- EXTRN prtString_:NEAR
-
- EXTRN Dispatch:WORD
- EXTRN Menu:WORD
- EXTRN Window:WORD
-
-
- .CODE
-
- COMMENT %
- ==============================================================================
- Displays a horizontal menu.
-
- Passed: bl - Color
- dx - Menu row/column
- si - Pointer to menu table
-
- =============================================================================%
- disHorzMenu PROC NEAR
- call menuInstVars
- setCur dh,dl ;Position cursor
- mov di,si
- dhm1: cursorRight ColOffset ;Space between menu items
- mov Wptr[di],dx ;Save row/column
- add di,2 ;Point to menu item ptr
- mov si,Wptr[di] ;Pass string addr
- call prtString_ ;Display the string
- add di,2 ;Point to next item's row/col
- identity Wptr[di],dhm1 ;Not nil? - Loop
- ret
- disHorzMenu ENDP
-
-
-
- .DATA
-
- defMsg HorzMenu,\
- Refresh,\
- <,,disHorzMenu>
-
- defObj HorzMenu,\
- <Window,Menu,Dispatch>,\
- <>,\
- <Refresh,Read,Next,Prev,Select,Clear>
-
-
-
- END
-